<?php

require_once 'Zend/View/Helper/Abstract.php';

class Core_View_Helper_Form_FormRow extends Zend_View_Helper_Abstract
{
    /**
     * comments
     */
    public function formRow($label, $control, $required = false)
    {
        $class = null;
        if ($required) {
            $class = ' required';
        }
        $xhtml[] = '<dt><label class="formRow' . $class . '">' . $label . '</label></dt>' . PHP_EOL;
        $xhtml[] = '<dd>' . $control . '</dd>';
        return implode(null, $xhtml);
    }
}